<?php
session_start();

require_once('classes/Tag.php');
require_once('classes/Item.php');

if($_POST['input'])
	$_SESSION['user'] = $_POST['input'];

$_SESSION['status'] = 'new';
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>GoedKado - WeMaken</title>
	<script type="text/javascript" src="jquery.min.js"></script>
	<style type="text/css">
		div.item {
			width:			100px;
			min-height:		250px;
			float:			left;
			margin:			5px;
		}
		div.item a, h1
		{
			font-size:		10px;
		}
		div.footer {
			clear:			both;
			padding-top:	20px;
		}
	</style>
	<script type="text/javascript">
		function make_request()
		{
			$.ajax({
			url: "handle.php",
			success: function(data){
				if(data == "done")
				{
					window.location = "result.php";
				}
				else
				{
					make_request();
				}
				
				$("#percentage").html(data);
			},
			error: function()
			{
				alert("failed to make request");
			}
			});
		}
		
		$(function()
		{
			make_request();
		});
	</script>
</head>

<body>
	<div>Zoekende</div>
	<div id="percentage"></div>
</body>
</html>